home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / INTERVIE / ITABLE.H < prev    next >
C/C++ Source or Header  |  1992-03-25  |  853b  |  42 lines

  1. /*
  2.  * Object association table.
  3.  */
  4.  
  5. #ifndef InteractorTable_h
  6. #define InteractorTable_h
  7.  
  8. #include <InterViews\table.h>
  9.  
  10. class Interactor;
  11. class InteractorTableEntry;
  12.  
  13. class InteractorTable : public Table {
  14. public:
  15.     InteractorTable(int);
  16.     void Insert(void*, class Interactor*);
  17.     boolean Find(class Interactor*&, void*);
  18.     void Remove(void*);
  19. };
  20.  
  21. inline InteractorTable::InteractorTable (int n) : Table (n) {}
  22.  
  23. inline void InteractorTable::Insert (void* k, class Interactor* v) {
  24.     Table::Insert((void*)k, (void*)v);
  25. }
  26.  
  27. inline boolean InteractorTable::Find (class Interactor*& v, void* k) {
  28.     void* vv;
  29.  
  30.     boolean b = Table::Find(vv, (void*)k);
  31.     if (b) {
  32.     v = (class Interactor*)vv;
  33.     }
  34.     return b;
  35. }
  36.  
  37. inline void InteractorTable::Remove (void* k) {
  38.     Table::Remove((void*)k);
  39. }
  40.  
  41. #endif
  42.